<?php

class Pasajero extends MY_Model {


	function Pasajero()
	{
		// Call the Model constructor
		parent::MY_Model();


		$this->setTituloModificar("Modificar Pasajero");
		$this->setTituloListado("Listado de Pasajeros");
		$this->setTituloCrear("Crear Pasajero");

		$this->nombreTabla = "pasajero";
		$this->idT1= "idpasajero";
		$this->nombreCampo = "nombre";

		$this->orderby= $this->idT1.' DESC';

		/*
		 * Cuando un campo tiene una key estatico definido con 
		 * 1 => entonces para cualquier tipo de usuario el dato es estatico 
		 * 2 => entonces solo para los tipo de usuarios que pueden editar solo sus propios datos
		 * (tipo 2) el dato es estatico
		 */

		$this->campos[] = array("realname" => "nombre",
					"clase" => "text",
					"label" => "Nombre",
					"rules" => "required|min_length[3]|max_length[45]|texto");

		$this->campos[] = array("realname" => "apellido",
					"clase" => "text",
					"label" => "Apellido",
					"rules" => "required|min_length[3]|max_length[45]|texto");

		$this->campos[] = array("realname" => "nacionalidad",
					"clase" => "text",
					"label" => "Nacionalidad",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "fechanacimiento",
					"clase" => "date",
					"label" => "Fecha de Nacimiento",
					"rules" => "fecha");

		$this->campos[] = array("realname" => "idestadocivil",
					"clase" => "opciones",
					"label" => "Estado Civil",
					"modelo" => "estadocivil",
					"rules" => "integer");

		$this->campos[] = array("realname" => "idtipodoc",
					"clase" => "opciones",
					"label" => "Tipo de Documento",
					"modelo" => "tipodoc",
					"rules" => "integer");

		$this->campos[] = array("realname" => "documento",
					"clase" => "text",
					"label" => "Nro Documento",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "profesion",
					"clase" => "text",
					"label" => "Profesi&oacute;n",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "domicilio",
					"clase" => "text",
					"label" => "Domicilio",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "ciudad",
					"clase" => "text",
					"label" => "Ciudad",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "provincia",
					"clase" => "text",
					"label" => "Provincia",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "telefono",
					"clase" => "text",
					"label" => "Telefono",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "email",
					"clase" => "text",
					"label" => "E-Mail",
					"rules" => "trim|max_length[100]|valid_email");

		$this->campos[] = array("realname" => "procedencia",
					"clase" => "text",
					"label" => "Procedencia",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "automarca",
					"clase" => "text",
					"label" => "Marca del Auto",
					"rules" => "max_length[45]|texto");

		$this->campos[] = array("realname" => "autopatente",
					"clase" => "text",
					"label" => "Patente del Auto",
					"rules" => "max_length[20]|texto");


		// Nombre de los modelos que son hijos
		//$this->hijos = array('pasajeroxdepto'=>'Asignar a Departamento');

		$this->extras[] = array('clase'=>'linkitem',
					'label'=>'Asignar a Departamento',
					'valor'=>'conquer/asignar/pasajeroxdepto/1a1/',
					'modelo'=>'pasajeroxdepto',
					'accion'=>'ver');

	}



}


?>
